﻿<Controls:SinacorWindow	
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:Custom="http://schemas.xceed.com/wpf/xaml/datagrid"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	xmlns:Controls="clr-namespace:Sinacor.Infra.UI.Controls.SmartClient;assembly=Sinacor.Infra.UI.Controls"
    xmlns:Validation="clr-namespace:Sinacor.Infra.UI.Controls.SmartClient.Validation;assembly=Sinacor.Infra.UI.Controls"
    WindowStartupLocation="CenterScreen" 
    WindowState="Maximized"
    Title="{DynamicResource Bovespa.ResumoFinanceiro.Label.FinanceiroPendente}"
	x:Class="Sinacor.UI.Bovespa.ResumoFinanceiro.View.SmartClient.FinanceiroPendente"
    ModulePlus="True"
    ModuleId="ORD" 
    HorizontalAlignment="Left" 
    VerticalAlignment="Stretch">

    <Controls:SinacorExpanderContainer>
        <Grid.RowDefinitions>
            <RowDefinition	Height="90"/>
            <RowDefinition	Height="4"/>
            <RowDefinition	Height="*"
							MinHeight="150"/>
        </Grid.RowDefinitions>
        <Controls:SinacorExpander	Header="{DynamicResource Bovespa.ResumoFinanceiro.Label.Pesquisa}"
									Grid.Row="0"
									TabIndex="4" 
                                    x:Name="ExpPesquisa"
									IsExpanded="True">
            <Grid x:Name="GrdPesquisa">
                <Controls:SinacorLabel	HorizontalAlignment="Left"
										VerticalAlignment="Top"
										Content="{DynamicResource Bovespa.ResumoFinanceiro.Label.DataPregao}"
                                        x:Name="LblDataPregao"
										Width="90" 
										HorizontalContentAlignment="Left"/>
                <Controls:SinacorLabel	HorizontalAlignment="Left"
										VerticalAlignment="Top"
										Content="{DynamicResource Bovespa.ResumoFinanceiro.Label.Cliente}"
                                        x:Name="LblCliente"
										Width="64" 
										Margin="109,0,0,0" 
										HorizontalContentAlignment="Left"/>
                <Controls:SinacorLabel	HorizontalAlignment="Left"
										VerticalAlignment="Top"
										Content="{DynamicResource Bovespa.ResumoFinanceiro.Label.Broker}"
                                        x:Name="LblBroker"
										Width="62" 
										Margin="239,0,0,0" 
										HorizontalContentAlignment="Left"/>
                <Controls:SinacorLabel	HorizontalAlignment="Left"
										VerticalAlignment="Top"
										Content="{DynamicResource Bovespa.ResumoFinanceiro.Label.IndBroker}"
                                        x:Name="LblIndBroker"
										Width="87" 
										Margin="369,0,0,0" 
										HorizontalContentAlignment="Left"/>
                <Controls:SinacorButton	ToolTip="{DynamicResource Bovespa.ResumoFinanceiro.Tooltip.ConsultaClientes}"
										TabIndex="3"
										Icon="IconButtonClient" 
                                        x:Name="BtnConsultaClientes"
										HorizontalAlignment="Left" 
										VerticalAlignment="Top" 
										Margin="213,21,0,0"/>
                <Controls:SinacorButton	HorizontalAlignment="Left"
                	           			VerticalAlignment="Top"
                    	       			Content="{DynamicResource Bovespa.ResumoFinanceiro.Label.Pesquisar}"
                        	   			Width="100"
                           				Margin="473,21,0,0"
                                        x:Name="BtnPesquisar"
                                        CausesValidation="True"
										IsDefault="True"
										ToolTip="{DynamicResource Bovespa.ResumoFinanceiro.Label.Pesquisar}"
										TabIndex="2"/>
                <Controls:SinacorButton	HorizontalAlignment="Left"
                	           			VerticalAlignment="Top"
                    	       			Content="{DynamicResource Bovespa.ResumoFinanceiro.Label.NovaPesquisa}"
                        	   			Width="100"
                           				Margin="577,21,0,0"
                                        x:Name="BtnNovaPesquisa"
										IsDefault="True"
										ToolTip="{DynamicResource Bovespa.ResumoFinanceiro.Label.NovaPesquisa}"
										TabIndex="2"/>
                <Controls:SinacorButton	HorizontalAlignment="Left"
                	           			VerticalAlignment="Top"
                    	       			Content="{DynamicResource Bovespa.ResumoFinanceiro.Label.CalcularTudo}"
                        	   			Width="100"
                                        x:Name="BtnCalculaTudo"
                                        CausesValidation="True"
                           				Margin="681,21,0,0"
										IsDefault="True"
										ToolTip="{DynamicResource Bovespa.ResumoFinanceiro.Label.CalcularTudo}"
										TabIndex="2"/>
                <Controls:SinacorComboBox IsSynchronizedWithCurrentItem="True" 
										HorizontalAlignment="Left" 
                                        x:Name="CboDataPregao"
                                        SelectedValuePath="DataPregao" 
                                        DisplayMemberPath="DataFormatada"
                                        ItemsSource="{Binding Calendario}"
                                        IsRequired="True"
                                        SelectedValue="{Binding FiltroFinanceiroPendente.DataPregao}"
										Margin="0,21,0,0"  
										VerticalAlignment="Top"/>
                <Controls:SinacorTextBox HorizontalAlignment="Left" 
										VerticalAlignment="Top" 
										Text="{Binding FiltroFinanceiroPendente.Cliente.Apelido}"
										TextWrapping="Wrap" 
                                        x:Name="TxtCliente"
                                        CharacterCasing="Upper"
										Height="21" 
										Margin="109,21,0,0" 
										MaxLength="7">
                    <Controls:SinacorTextBox.ValidationRules>
                        <Validation:EventValidationRule Validating="TxtCliente_Validating"/>
                    </Controls:SinacorTextBox.ValidationRules>
                </Controls:SinacorTextBox>
                <Controls:SinacorTextBox HorizontalAlignment="Left" 
										VerticalAlignment="Top" 
										Text="{Binding FiltroFinanceiroPendente.Broker.Apelido}"
										TextWrapping="Wrap" 
                                        x:Name="TxtBroker"
                                        CharacterCasing="Upper"
										Height="21" 
										Margin="239,21,0,0" 
										MaxLength="7">
                    <Controls:SinacorTextBox.ValidationRules>
                        <Validation:EventValidationRule Validating="TxtBroker_Validating"/>
                    </Controls:SinacorTextBox.ValidationRules>
                </Controls:SinacorTextBox>
                <Controls:SinacorButton	ToolTip="{DynamicResource Bovespa.ResumoFinanceiro.Tooltip.ConsultaClientes}"
										TabIndex="3"
										Icon="IconButtonClient" 
                                        x:Name="BtnConsultaBroker"
										HorizontalAlignment="Left" 
										VerticalAlignment="Top" 
										Margin="343,21,0,0"/>
                <Controls:SinacorComboBox IsSynchronizedWithCurrentItem="True" 
										Margin="369,21,0,0"  
                                        x:Name="CboIndBroker"
                                        IsRequired="True"
                                        ItemsSource="{Binding ListaTipoCliente}"
                                        SelectedValue="{Binding FiltroFinanceiroPendente.IndicadorBroker}"
										VerticalAlignment="Top" HorizontalAlignment="Left"/>
            </Grid>

        </Controls:SinacorExpander>
        <Controls:SinacorExpander	Header="{DynamicResource Bovespa.ResumoFinanceiro.Label.FinanceiroPendentes}"
									Grid.Row="2"
									TabIndex="6"
                                    x:Name="ExpFinanceiroPendentes"
									IsExpanded="True" Margin="0,0,0,8" HorizontalAlignment="Stretch">
            <Grid Height="Auto">
                <Controls:SinacorButton x:Name="BtnCalcular" Content="{DynamicResource Bovespa.ResumoFinanceiro.Label.Calcular}" HorizontalAlignment="Left" Margin="551,498,0,0" VerticalAlignment="Top" Width="100" Height="21"/>
                <Controls:SinacorButton x:Name="BtnCancelar" HorizontalAlignment="Left" VerticalAlignment="Top" Content="{DynamicResource Bovespa.ResumoFinanceiro.Label.Cancelar}" Margin="655,498,0,0"/>
                <Controls:SinacorDataGrid TabIndex="5" 
        			x:Name="DtgFinanceiroPendentes"
                    ItemsSource="{Binding ListaFinanceiroPendente}"
                    SelectionMode="Multiple" 
        			AllowBeginInsert="False" 
        			AllowBeginUpdate="False" 
        			AllowCancelInsert="False" 
        			AllowCancelUpdate="False" 
        			AllowDelete="False" 
        			AllowEndInsert="False" 
        			AllowEndUpdate="False" 
        			AllowSave="False" 
        			AllowSaveAll="False" 
        			AllowUndoAll="False" 
        			AllowUndoLast="False" Margin="0,0,0,0" VerticalAlignment="Top" Height="450">
                    <Controls:SinacorDataGrid.ContextMenuTemplate>
                        <DataTemplate>
                            <StackPanel>
                                <Controls:SinacorContextMenuItem x:Name="CmiCacularFinanceiro"
        							Header="{DynamicResource Bovespa.ResumoFinanceiro.Label.CalcularFinanceiro}" Click="CmiCacularFinanceiro_Click" Loaded="CmiCacularFinanceiro_Loaded" />
                            </StackPanel>
                        </DataTemplate>
                    </Controls:SinacorDataGrid.ContextMenuTemplate>
                    <Controls:SinacorDataGrid.Columns>

                        <Controls:Column Name="DataPregao"
        					Title="Bovespa.ResumoFinanceiro.Label.DataPregao"
                            DisplayMemberPath="DataPregao"
        					HorizontalCellAlignment="Left"/>

                        <Controls:Column Name="Cliente"
        					Title="Bovespa.ResumoFinanceiro.Label.Cliente"
        					DisplayMemberPath="ApelidoCliente"
        					HorizontalCellAlignment="Left"/>

                        <Controls:Column Name="Broker"
        					DisplayMemberPath="ApelidoBroker"
                            Title="Bovespa.ResumoFinanceiro.Label.Broker"
        					HorizontalCellAlignment="Left"/>

                        <Controls:Column Name="BolsaFat"
        					Title="Bovespa.ResumoFinanceiro.Label.BolsaFaturamento"
                            DisplayMemberPath="BolsaFaturamento"
        					HorizontalCellAlignment="Left"/>

                        <Controls:Column Name="Nota"
        					Title="Bovespa.ResumoFinanceiro.Label.Nota"
                            DisplayMemberPath="LiquidacaoNota"
        					HorizontalCellAlignment="Left"/>

                        <Controls:Column Name="DataLiquidacao"
        					Title="Bovespa.ResumoFinanceiro.Label.DataLiq"
                            DisplayMemberPath="DataLiquidacao"
        					HorizontalCellAlignment="Left"/>

                        <Controls:Column Name="LiqNota"
        					Title="Bovespa.ResumoFinanceiro.Label.LiqNota"
                            DisplayMemberPath="LiquidacaoNota"
        					HorizontalCellAlignment="Left"/>

                        <Controls:Column Name="HorarioAlocacao"
        					Title="Bovespa.ResumoFinanceiro.Label.HorarioUltAlocacao"
                            DisplayMemberPath="DataUltimaAlocacao"
        					HorizontalCellAlignment="Left"/>

                        <Controls:Column Name="HorarioCalculo"
        					Title="Bovespa.ResumoFinanceiro.Label.HorarioUltCalculo"
                            DisplayMemberPath="DataUltimaAtualizacao"
        					HorizontalCellAlignment="Left"/>

                        <Controls:Column Name="IndBroker"
        					Title="Bovespa.ResumoFinanceiro.Label.IndBroker"
                            DisplayMemberPath="IndicadorBroker"
        					HorizontalCellAlignment="Left"/>

                    </Controls:SinacorDataGrid.Columns>
                </Controls:SinacorDataGrid>
                <Controls:SinacorGroupBox x:Name="GrpStatus" VerticalAlignment="Top" Header="{DynamicResource Bovespa.ResumoFinanceiro.Label.Status}" Margin="0,454,0,0" Width="547" Height="65" HorizontalAlignment="Left">
                    <Grid>
                        <Controls:SinacorProgressBar x:Name="PgbProgresso" HorizontalAlignment="Left" Margin="8,0,0,0" VerticalAlignment="Top" Width="520" Height="10" Value="{Binding StatusProcesso.Progress}"/>
                    </Grid>
                </Controls:SinacorGroupBox>
            </Grid>
        </Controls:SinacorExpander>
    </Controls:SinacorExpanderContainer>
</Controls:SinacorWindow>